package edu.ntu.im.p2ptrade.msg.handle;

import java.util.LinkedList;
import java.util.List;

import net.jxta.endpoint.Message;
import edu.ntu.im.p2ptrade.LockListener;
import edu.ntu.im.p2ptrade.P2PTrade;
import edu.ntu.im.p2ptrade.msg.PMessage;

public class DenyLockHandle implements PMessageHandle {
//	List<LockListener> listeners = new LinkedList<LockListener>();
	
	
	
	public void handle(Message msg) {
		String transactionId = msg.getMessageElement(P2PTrade.getInstance().getAppName(), PMessage.TRANSACTIONID).toString();
		for (LockListener lis: EventRegister.lockListener){
			lis.lockDenied(transactionId);
		}
	}

}
